package Catalogos;

import Componentes.InternalFrame;
import Componentes.RendersValidators.ButtonRenderClientes;
import Modelos.TblClientes;
import java.awt.Font;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.beans.Beans;
import javax.swing.table.TableRowSorter;

public final class dlgClientes extends InternalFrame {

    protected static dlgClientes yo = null;
    private TableRowSorter sorter;
    private ButtonRenderClientes render= new ButtonRenderClientes(true);

    private dlgClientes() {
        initComponents();
        this.tblDatos1.getColumnModel().getColumn(0).setCellRenderer(render);
        sorter = new TableRowSorter(tblDatos1.getModel());
        tblDatos1.setRowSorter(sorter);
        cargarPrpiedadesExtra();
        if (!Beans.isDesignTime()) {
            goBoxEntityManager.getTransaction().begin();
        }
        txtFiltro1.addKeyListener(new KeyAdapter() {

            @Override
            public void keyReleased(KeyEvent ke) {
                super.keyReleased(ke);
                if (!txtFiltro1.getText().equals(txtFiltro1.getFrase())) {
                    sorter.setRowFilter(javax.swing.RowFilter.regexFilter(txtFiltro1.getText()));
                }
            }
        });

        this.jProgressBar1.setValue(100);
        this.jProgressBar1.setString("Listo");
    }

    public static dlgClientes getInstance() {
        if (yo == null) {
            yo = new dlgClientes();
        }
        return yo;
    }

    public void cargarPrpiedadesExtra() {

        int fontTam = Integer.parseInt(propiedades.getProperty("TamanoFuente", "12"));
        String fontName = propiedades.getProperty("NombreFuente", "Lucida Grande");
        int fontStyle = Integer.parseInt(propiedades.getProperty("EstiloFuente", "1"));
        this.tblDatos1.setFont(new Font(fontName, fontStyle, fontTam));
        this.tblDatos1.setRowHeight(Integer.parseInt(propiedades.getProperty("TamCelda", "18")));
        String osnom = System.getProperty("os.name");
        if (osnom.equals("Mac OS X")) {
            Launcher.Launcher.getInstance().a.requestUserAttention(true);
        }

    }

    @Override
    public void dispose() {
        super.dispose();
        GuardarPropiedad("TamanoFuente", "" + tblDatos1.getFont().getSize());
        GuardarPropiedad("NombreFuente", tblDatos1.getFont().getFontName());
        GuardarPropiedad("EstiloFuente", "" + tblDatos1.getFont().getStyle());
        GuardarPropiedad("TamCelda", "" + tblDatos1.getRowHeight());


    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        bindingGroup = new org.jdesktop.beansbinding.BindingGroup();

        goBoxEntityManager = java.beans.Beans.isDesignTime() ? null : javax.persistence.Persistence.createEntityManagerFactory("goBox").createEntityManager();
        tblClientesQuery = java.beans.Beans.isDesignTime() ? null : goBoxEntityManager.createQuery("SELECT t FROM TblClientes t");
        tblClientesList = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : org.jdesktop.observablecollections.ObservableCollections.observableList(new java.util.LinkedList(tblClientesQuery.getResultList()));
        accionCancelar1 = new Acciones.Persistencia.AccionCancelar();
        accionEliminar1 = new Acciones.Persistencia.AccionEliminar();
        accionGuadar1 = new Acciones.Persistencia.AccionGuadar();
        accionNuevo1 = new Acciones.Persistencia.AccionNuevo();
        accionRefrescar1 = new Acciones.Persistencia.AccionRefrescar();
        accionAumentarFuente1 = new Acciones.Edicion.AccionAumentarFuente();
        accionDisminuirFuente1 = new Acciones.Edicion.AccionDisminuirFuente();
        accionPersonalizarFuente1 = new Acciones.Edicion.AccionPersonalizarFuente();
        buttonEditor1 = new Componentes.ButtonEditor();
        accionMail1 = new Acciones.Edicion.AccionMail();
        separador = new javax.swing.JToolBar();
        btnNuevo = new Componentes.Button();
        btnEliminar = new Componentes.Button();
        btnCancelar = new Componentes.Button();
        btnGuardar = new Componentes.Button();
        jButton3 = new javax.swing.JButton();
        jSeparator1 = new javax.swing.JToolBar.Separator();
        jButton1 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        jButton4 = new javax.swing.JButton();
        jSeparator2 = new javax.swing.JToolBar.Separator();
        jButton5 = new javax.swing.JButton();
        filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(100, 0), new java.awt.Dimension(100, 0), new java.awt.Dimension(2000, 32767));
        jSeparator6 = new javax.swing.JToolBar.Separator();
        txtEspecial1 = new Componentes.Texfields.txtEspecial();
        jSeparator7 = new javax.swing.JToolBar.Separator();
        pnlRedondo1 = new org.edisoncor.gui.panel.PanelNice();
        txtFiltro1 = new Componentes.Texfields.txtFiltro();
        pnlRedondo2 = new org.edisoncor.gui.panel.PanelNice();
        jSplitPane1 = new javax.swing.JSplitPane();
        jScrollPane1 = new javax.swing.JScrollPane();
        tblDatos1 = new Componentes.tblDatos();
        pnlRedondo3 = new org.edisoncor.gui.panel.PanelNice();
        jTextField1 = new javax.swing.JTextField();
        jLabel1 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jTextField3 = new javax.swing.JTextField();
        pnlRedondo4 = new org.edisoncor.gui.panel.PanelNice();
        jScrollPane2 = new javax.swing.JScrollPane();
        tblDatos2 = new Componentes.tblDatos();
        jSplitPane2 = new javax.swing.JSplitPane();
        jSplitPane3 = new javax.swing.JSplitPane();
        jProgressBar1 = new javax.swing.JProgressBar();
        jLabel4 = new javax.swing.JLabel();
        jSplitPane4 = new javax.swing.JSplitPane();
        jSplitPane5 = new javax.swing.JSplitPane();
        jProgressBar2 = new javax.swing.JProgressBar();
        jLabel6 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        mnuNuevo = new javax.swing.JMenuItem();
        mnuEliminar = new javax.swing.JMenuItem();
        mnuCancelar = new javax.swing.JMenuItem();
        mnuGuardar = new javax.swing.JMenuItem();
        jMenuItem9 = new javax.swing.JMenuItem();
        jMenu2 = new javax.swing.JMenu();
        jMenu3 = new javax.swing.JMenu();
        jMenuItem3 = new javax.swing.JMenuItem();
        jMenuItem5 = new javax.swing.JMenuItem();
        jMenuItem4 = new javax.swing.JMenuItem();

        accionCancelar1.setEm(goBoxEntityManager);
        accionCancelar1.setLs(tblClientesList);
        accionCancelar1.setQ(tblClientesQuery);

        accionEliminar1.setEm(goBoxEntityManager);
        accionEliminar1.setLs(tblClientesList);
        accionEliminar1.setTbl(tblDatos1);

        accionGuadar1.setEm(goBoxEntityManager);
        accionGuadar1.setLs(tblClientesList);
        accionGuadar1.setValidador(render);

        accionNuevo1.setEm(goBoxEntityManager);
        accionNuevo1.setLs(tblClientesList);
        accionNuevo1.setO(new TblClientes());
        accionNuevo1.setTbl(tblDatos1);

        accionRefrescar1.setEm(goBoxEntityManager);
        accionRefrescar1.setLs(tblClientesList);
        accionRefrescar1.setQ(tblClientesQuery);

        accionAumentarFuente1.setObjeto(tblDatos1);

        accionDisminuirFuente1.setObjeto(tblDatos1);

        accionPersonalizarFuente1.setElemento(tblDatos1);

        accionMail1.setLs(tblClientesList);
        accionMail1.setTabla(tblDatos1);

        setBackground(new java.awt.Color(255, 255, 255));
        setClosable(true);
        setIconifiable(true);
        setMaximizable(true);
        setResizable(true);
        setTitle(Configuraciones.Configuraciones.NOMBRE_CLIENTES);

        separador.setBackground(new java.awt.Color(121, 137, 167));
        separador.setBorder(null);
        separador.setFloatable(false);
        separador.setRollover(true);

        btnNuevo.setAction(accionNuevo1);
        btnNuevo.setText("button1");
        btnNuevo.setBorderPainted(false);
        btnNuevo.setFocusable(false);
        btnNuevo.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnNuevo.setMargin(new java.awt.Insets(0, 0, 0, 0));
        btnNuevo.setMaximumSize(new java.awt.Dimension(35, 44));
        btnNuevo.setMinimumSize(new java.awt.Dimension(44, 44));
        btnNuevo.setPreferredSize(new java.awt.Dimension(35, 44));
        btnNuevo.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM);
        btnNuevo.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
        separador.add(btnNuevo);

        btnEliminar.setAction(accionEliminar1);
        btnEliminar.setText("button2");
        btnEliminar.setBorderPainted(false);
        btnEliminar.setFocusable(false);
        btnEliminar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnEliminar.setMargin(new java.awt.Insets(0, 0, 0, 0));
        btnEliminar.setMaximumSize(new java.awt.Dimension(35, 44));
        btnEliminar.setMinimumSize(new java.awt.Dimension(35, 44));
        btnEliminar.setPreferredSize(new java.awt.Dimension(35, 44));
        btnEliminar.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM);
        btnEliminar.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
        separador.add(btnEliminar);

        btnCancelar.setAction(accionCancelar1);
        btnCancelar.setText("button3");
        btnCancelar.setBorderPainted(false);
        btnCancelar.setFocusable(false);
        btnCancelar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnCancelar.setMargin(new java.awt.Insets(0, 0, 0, 0));
        btnCancelar.setMaximumSize(new java.awt.Dimension(35, 44));
        btnCancelar.setMinimumSize(new java.awt.Dimension(44, 44));
        btnCancelar.setPreferredSize(new java.awt.Dimension(35, 44));
        btnCancelar.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM);
        btnCancelar.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
        separador.add(btnCancelar);

        btnGuardar.setAction(accionGuadar1);
        btnGuardar.setText("button4");
        btnGuardar.setBorderPainted(false);
        btnGuardar.setFocusable(false);
        btnGuardar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnGuardar.setMargin(new java.awt.Insets(0, 0, 0, 0));
        btnGuardar.setMaximumSize(new java.awt.Dimension(35, 44));
        btnGuardar.setMinimumSize(new java.awt.Dimension(44, 44));
        btnGuardar.setPreferredSize(new java.awt.Dimension(35, 44));
        btnGuardar.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM);
        btnGuardar.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
        separador.add(btnGuardar);

        jButton3.setAction(accionRefrescar1);
        jButton3.setBorderPainted(false);
        jButton3.setFocusable(false);
        jButton3.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton3.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jButton3.setMaximumSize(new java.awt.Dimension(35, 44));
        jButton3.setPreferredSize(new java.awt.Dimension(35, 44));
        jButton3.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM);
        jButton3.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
        separador.add(jButton3);

        jSeparator1.setBackground(new java.awt.Color(255, 255, 255));
        jSeparator1.setForeground(new java.awt.Color(255, 255, 255));
        separador.add(jSeparator1);

        jButton1.setAction(accionAumentarFuente1);
        jButton1.setBorderPainted(false);
        jButton1.setFocusable(false);
        jButton1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton1.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jButton1.setMaximumSize(new java.awt.Dimension(35, 44));
        jButton1.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM);
        jButton1.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
        separador.add(jButton1);

        jButton2.setAction(accionDisminuirFuente1);
        jButton2.setBorderPainted(false);
        jButton2.setFocusable(false);
        jButton2.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton2.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jButton2.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM);
        jButton2.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
        separador.add(jButton2);

        jButton4.setAction(accionPersonalizarFuente1);
        jButton4.setBorderPainted(false);
        jButton4.setFocusable(false);
        jButton4.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton4.setMaximumSize(new java.awt.Dimension(35, 44));
        jButton4.setPreferredSize(new java.awt.Dimension(35, 44));
        jButton4.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM);
        jButton4.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
        separador.add(jButton4);

        jSeparator2.setForeground(new java.awt.Color(255, 255, 255));
        separador.add(jSeparator2);

        jButton5.setAction(accionMail1);
        jButton5.setBorderPainted(false);
        jButton5.setFocusable(false);
        jButton5.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton5.setPreferredSize(new java.awt.Dimension(35, 44));
        jButton5.setSize(new java.awt.Dimension(35, 44));
        jButton5.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM);
        jButton5.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
        separador.add(jButton5);
        separador.add(filler1);

        jSeparator6.setForeground(new java.awt.Color(255, 255, 255));
        separador.add(jSeparator6);

        txtEspecial1.setAnchoDeBorde(0.0F);
        txtEspecial1.setColorDeBorde(new java.awt.Color(121, 137, 167));
        txtEspecial1.setFrase("Buscar (ctrl + B)");
        txtEspecial1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Recursos/Iconos/filtrar.png"))); // NOI18N
        txtEspecial1.setMaximumSize(new java.awt.Dimension(130, 22));
        txtEspecial1.setPreferredSize(new java.awt.Dimension(130, 20));
        separador.add(txtEspecial1);

        jSeparator7.setForeground(new java.awt.Color(121, 137, 167));
        separador.add(jSeparator7);

        pnlRedondo1.setBackground(new java.awt.Color(220, 230, 240));

        txtFiltro1.setFrase("Ingrese su Busqueda Aqui");

        org.jdesktop.layout.GroupLayout pnlRedondo1Layout = new org.jdesktop.layout.GroupLayout(pnlRedondo1);
        pnlRedondo1.setLayout(pnlRedondo1Layout);
        pnlRedondo1Layout.setHorizontalGroup(
            pnlRedondo1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, pnlRedondo1Layout.createSequentialGroup()
                .add(4, 4, 4)
                .add(txtFiltro1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .add(4, 4, 4))
        );
        pnlRedondo1Layout.setVerticalGroup(
            pnlRedondo1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(pnlRedondo1Layout.createSequentialGroup()
                .add(4, 4, 4)
                .add(txtFiltro1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .add(4, 4, 4))
        );

        pnlRedondo2.setBackground(new java.awt.Color(220, 230, 240));

        jSplitPane1.setBorder(null);
        jSplitPane1.setDividerLocation(210);
        jSplitPane1.setDividerSize(6);
        jSplitPane1.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
        jSplitPane1.setOpaque(false);

        org.jdesktop.swingbinding.JTableBinding jTableBinding = org.jdesktop.swingbinding.SwingBindings.createJTableBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, tblClientesList, tblDatos1);
        org.jdesktop.swingbinding.JTableBinding.ColumnBinding columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${idcliente}"));
        columnBinding.setColumnName("");
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${rfc}"));
        columnBinding.setColumnName("RFC");
        columnBinding.setColumnClass(String.class);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${nombre}"));
        columnBinding.setColumnName("Nombre");
        columnBinding.setColumnClass(String.class);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${apellidop}"));
        columnBinding.setColumnName("Apellido Paterno");
        columnBinding.setColumnClass(String.class);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${apellidom}"));
        columnBinding.setColumnName("Apellido Materno");
        columnBinding.setColumnClass(String.class);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${estatus}"));
        columnBinding.setColumnName("Estatus");
        columnBinding.setColumnClass(Boolean.class);
        bindingGroup.addBinding(jTableBinding);
        jTableBinding.bind();
        jScrollPane1.setViewportView(tblDatos1);
        tblDatos1.getColumnModel().getColumn(0).setMinWidth(20);
        tblDatos1.getColumnModel().getColumn(0).setPreferredWidth(20);
        tblDatos1.getColumnModel().getColumn(0).setMaxWidth(20);
        tblDatos1.getColumnModel().getColumn(0).setCellEditor(buttonEditor1);
        tblDatos1.getColumnModel().getColumn(1).setMinWidth(100);
        tblDatos1.getColumnModel().getColumn(1).setPreferredWidth(120);
        tblDatos1.getColumnModel().getColumn(1).setMaxWidth(160);
        tblDatos1.getColumnModel().getColumn(5).setMinWidth(60);
        tblDatos1.getColumnModel().getColumn(5).setPreferredWidth(60);
        tblDatos1.getColumnModel().getColumn(5).setMaxWidth(60);

        jSplitPane1.setTopComponent(jScrollPane1);

        pnlRedondo3.setBackground(new java.awt.Color(255, 255, 255));

        org.jdesktop.beansbinding.Binding binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, tblDatos1, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.telefono}"), jTextField1, org.jdesktop.beansbinding.BeanProperty.create("text"));
        bindingGroup.addBinding(binding);

        jLabel1.setText("Teléfono");

        jLabel3.setText("Correo");

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, tblDatos1, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.correo}"), jTextField3, org.jdesktop.beansbinding.BeanProperty.create("text"));
        bindingGroup.addBinding(binding);

        org.jdesktop.layout.GroupLayout pnlRedondo3Layout = new org.jdesktop.layout.GroupLayout(pnlRedondo3);
        pnlRedondo3.setLayout(pnlRedondo3Layout);
        pnlRedondo3Layout.setHorizontalGroup(
            pnlRedondo3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(pnlRedondo3Layout.createSequentialGroup()
                .add(pnlRedondo3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(pnlRedondo3Layout.createSequentialGroup()
                        .add(4, 4, 4)
                        .add(jTextField1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 225, Short.MAX_VALUE))
                    .add(pnlRedondo3Layout.createSequentialGroup()
                        .add(8, 8, 8)
                        .add(jLabel1)))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(pnlRedondo3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(pnlRedondo3Layout.createSequentialGroup()
                        .add(jLabel3)
                        .add(0, 328, Short.MAX_VALUE))
                    .add(jTextField3))
                .addContainerGap())
        );
        pnlRedondo3Layout.setVerticalGroup(
            pnlRedondo3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(pnlRedondo3Layout.createSequentialGroup()
                .addContainerGap()
                .add(pnlRedondo3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(jTextField3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(pnlRedondo3Layout.createSequentialGroup()
                        .add(pnlRedondo3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(jLabel1)
                            .add(jLabel3))
                        .add(2, 2, 2)
                        .add(jTextField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(25, Short.MAX_VALUE))
        );

        jSplitPane1.setRightComponent(pnlRedondo3);

        org.jdesktop.layout.GroupLayout pnlRedondo2Layout = new org.jdesktop.layout.GroupLayout(pnlRedondo2);
        pnlRedondo2.setLayout(pnlRedondo2Layout);
        pnlRedondo2Layout.setHorizontalGroup(
            pnlRedondo2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(pnlRedondo2Layout.createSequentialGroup()
                .add(8, 8, 8)
                .add(jSplitPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                .add(8, 8, 8))
        );
        pnlRedondo2Layout.setVerticalGroup(
            pnlRedondo2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(pnlRedondo2Layout.createSequentialGroup()
                .add(8, 8, 8)
                .add(jSplitPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 293, Short.MAX_VALUE)
                .add(8, 8, 8))
        );

        pnlRedondo4.setBackground(new java.awt.Color(220, 230, 240));

        org.jdesktop.beansbinding.ELProperty eLProperty = org.jdesktop.beansbinding.ELProperty.create("${selectedElement.tblDireccionesList}");
        jTableBinding = org.jdesktop.swingbinding.SwingBindings.createJTableBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, tblDatos1, eLProperty, tblDatos2);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${calle}"));
        columnBinding.setColumnName("Calle");
        columnBinding.setColumnClass(String.class);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${noExterior}"));
        columnBinding.setColumnName("No Exterior");
        columnBinding.setColumnClass(Integer.class);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${noInterior}"));
        columnBinding.setColumnName("No Interior");
        columnBinding.setColumnClass(String.class);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${colonia}"));
        columnBinding.setColumnName("Colonia");
        columnBinding.setColumnClass(String.class);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${cp}"));
        columnBinding.setColumnName("Cp");
        columnBinding.setColumnClass(Integer.class);
        bindingGroup.addBinding(jTableBinding);
        jTableBinding.bind();
        jScrollPane2.setViewportView(tblDatos2);

        org.jdesktop.layout.GroupLayout pnlRedondo4Layout = new org.jdesktop.layout.GroupLayout(pnlRedondo4);
        pnlRedondo4.setLayout(pnlRedondo4Layout);
        pnlRedondo4Layout.setHorizontalGroup(
            pnlRedondo4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, pnlRedondo4Layout.createSequentialGroup()
                .add(8, 8, 8)
                .add(jScrollPane2)
                .add(8, 8, 8))
        );
        pnlRedondo4Layout.setVerticalGroup(
            pnlRedondo4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(pnlRedondo4Layout.createSequentialGroup()
                .add(8, 8, 8)
                .add(jScrollPane2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 131, Short.MAX_VALUE)
                .add(8, 8, 8))
        );

        jSplitPane2.setBackground(new java.awt.Color(255, 255, 255));
        jSplitPane2.setBorder(null);
        jSplitPane2.setDividerLocation(200);
        jSplitPane2.setDividerSize(0);

        jSplitPane3.setBorder(null);
        jSplitPane3.setDividerLocation(4);
        jSplitPane3.setDividerSize(0);
        jSplitPane3.setOpaque(false);

        jProgressBar1.setStringPainted(true);
        jSplitPane3.setRightComponent(jProgressBar1);

        jLabel4.setText("  ");
        jSplitPane3.setLeftComponent(jLabel4);

        jSplitPane2.setLeftComponent(jSplitPane3);

        jSplitPane4.setBackground(new java.awt.Color(255, 255, 255));
        jSplitPane4.setBorder(null);
        jSplitPane4.setDividerLocation(200);
        jSplitPane4.setDividerSize(0);

        jSplitPane5.setBorder(null);
        jSplitPane5.setDividerLocation(4);
        jSplitPane5.setDividerSize(0);
        jSplitPane5.setOpaque(false);

        jProgressBar2.setStringPainted(true);
        jSplitPane5.setRightComponent(jProgressBar2);

        jLabel6.setText("  ");
        jSplitPane5.setLeftComponent(jLabel6);

        jSplitPane4.setLeftComponent(jSplitPane5);

        jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jSplitPane4.setRightComponent(jLabel5);

        jMenu1.setText("Archivo");

        mnuNuevo.setAction(accionNuevo1);
        jMenu1.add(mnuNuevo);

        mnuEliminar.setAction(accionEliminar1);
        jMenu1.add(mnuEliminar);

        mnuCancelar.setAction(accionCancelar1);
        jMenu1.add(mnuCancelar);

        mnuGuardar.setAction(accionGuadar1);
        jMenu1.add(mnuGuardar);

        jMenuItem9.setAction(accionRefrescar1);
        jMenu1.add(jMenuItem9);

        jMenuBar1.add(jMenu1);

        jMenu2.setText("Edición");

        jMenu3.setText("Fuente");

        jMenuItem3.setAction(accionAumentarFuente1);
        jMenu3.add(jMenuItem3);

        jMenuItem5.setAction(accionDisminuirFuente1);
        jMenu3.add(jMenuItem5);

        jMenuItem4.setAction(accionPersonalizarFuente1);
        jMenu3.add(jMenuItem4);

        jMenu2.add(jMenu3);

        jMenuBar1.add(jMenu2);

        setJMenuBar(jMenuBar1);

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(separador, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .add(layout.createSequentialGroup()
                .add(4, 4, 4)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(pnlRedondo1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(pnlRedondo2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .add(4, 4, 4))
            .add(layout.createSequentialGroup()
                .add(8, 8, 8)
                .add(pnlRedondo4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .add(8, 8, 8))
            .add(jSplitPane4)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .add(separador, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 29, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .add(4, 4, 4)
                .add(pnlRedondo1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .add(4, 4, 4)
                .add(pnlRedondo2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .add(8, 8, 8)
                .add(pnlRedondo4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 8, Short.MAX_VALUE)
                .add(jSplitPane4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
        );

        bindingGroup.bind();

        pack();
    }// </editor-fold>//GEN-END:initComponents
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private Acciones.Edicion.AccionAumentarFuente accionAumentarFuente1;
    private Acciones.Persistencia.AccionCancelar accionCancelar1;
    private Acciones.Edicion.AccionDisminuirFuente accionDisminuirFuente1;
    private Acciones.Persistencia.AccionEliminar accionEliminar1;
    private Acciones.Persistencia.AccionGuadar accionGuadar1;
    private Acciones.Edicion.AccionMail accionMail1;
    private Acciones.Persistencia.AccionNuevo accionNuevo1;
    private Acciones.Edicion.AccionPersonalizarFuente accionPersonalizarFuente1;
    private Acciones.Persistencia.AccionRefrescar accionRefrescar1;
    private Componentes.Button btnCancelar;
    private Componentes.Button btnEliminar;
    private Componentes.Button btnGuardar;
    private Componentes.Button btnNuevo;
    private Componentes.ButtonEditor buttonEditor1;
    private javax.swing.Box.Filler filler1;
    private javax.persistence.EntityManager goBoxEntityManager;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JButton jButton5;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenu jMenu3;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem3;
    private javax.swing.JMenuItem jMenuItem4;
    private javax.swing.JMenuItem jMenuItem5;
    private javax.swing.JMenuItem jMenuItem9;
    private javax.swing.JProgressBar jProgressBar1;
    private javax.swing.JProgressBar jProgressBar2;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JToolBar.Separator jSeparator1;
    private javax.swing.JToolBar.Separator jSeparator2;
    private javax.swing.JToolBar.Separator jSeparator6;
    private javax.swing.JToolBar.Separator jSeparator7;
    private javax.swing.JSplitPane jSplitPane1;
    private javax.swing.JSplitPane jSplitPane2;
    private javax.swing.JSplitPane jSplitPane3;
    private javax.swing.JSplitPane jSplitPane4;
    private javax.swing.JSplitPane jSplitPane5;
    private javax.swing.JTextField jTextField1;
    private javax.swing.JTextField jTextField3;
    private javax.swing.JMenuItem mnuCancelar;
    private javax.swing.JMenuItem mnuEliminar;
    private javax.swing.JMenuItem mnuGuardar;
    private javax.swing.JMenuItem mnuNuevo;
    private org.edisoncor.gui.panel.PanelNice pnlRedondo1;
    private org.edisoncor.gui.panel.PanelNice pnlRedondo2;
    private org.edisoncor.gui.panel.PanelNice pnlRedondo3;
    private org.edisoncor.gui.panel.PanelNice pnlRedondo4;
    private javax.swing.JToolBar separador;
    private java.util.List<Modelos.TblClientes> tblClientesList;
    private javax.persistence.Query tblClientesQuery;
    private Componentes.tblDatos tblDatos1;
    private Componentes.tblDatos tblDatos2;
    private Componentes.Texfields.txtEspecial txtEspecial1;
    private Componentes.Texfields.txtFiltro txtFiltro1;
    private org.jdesktop.beansbinding.BindingGroup bindingGroup;
    // End of variables declaration//GEN-END:variables
}
